<template>
  <div>
    <t-dialog v-model:visible="visible" :header="isAdd ? '添加物料' : '编辑物料'" width="70%" @confirm="onConfirm">
      <div>
        <t-form :data="formData" :colon="true">
          <t-row :gutter="15">
            <t-col :span="4" class="form_col">
              <t-form-item label="料号" name="FNumber" >
                <t-input v-model="formData.FNumber" placeholder="请输入内容" />
              </t-form-item>
            </t-col>

            <t-col :span="4" class="form_col">
              <t-form-item label="规格型号" name="FITEMMODEL" >
                <t-input v-model="formData.FITEMMODEL" placeholder="请输入内容" />
              </t-form-item>
            </t-col>


          

          </t-row>
        </t-form>


      </div>
    </t-dialog>
  </div>
</template>
<script>
import { ref, reactive, onMounted } from 'vue'
import { queryMaterialGroupList } from '@/service/material'

export default {
  components: {},
  setup(props) {
    const visible = ref(false)
    const isAdd = ref(false)
    const materGroupList = ref([])
    const formData = reactive({
      account: '',
      password: '',
    });

    const openModal = async (row) => {
      isAdd.value = !row
      if (!isAdd.value) {
        Object.assign(formData, row)
        //formData
        // const res = await queryMaterialList({FNumber})
        // if(res[0]){
        //   Object.assign(formData,res[0])
        // }
      }
      visible.value = true

    }


    const onConfirm = ()=>{
      


    }



    onMounted(() => {
    })


    return { visible, openModal, isAdd, formData,materGroupList }
  }


}


</script>